import request from '@/utils/request'

// 查询公摊报表列表
export function listPublicShareReport(query) {
  return request({
    url: '/datastatistics/publicShareReport/list',
    method: 'get',
    params: query
  })
}

// 查询公摊报表详细
export function getPublicShareReport(id) {
  return request({
    url: '/datastatistics/publicShareReport/' + id,
    method: 'get'
  })
}

// 新增公摊报表
export function addPublicShareReport(data) {
  return request({
    url: '/datastatistics/publicShareReport',
    method: 'post',
    data: data
  })
}

// 修改公摊报表
export function updatePublicShareReport(data) {
  return request({
    url: '/datastatistics/publicShareReport',
    method: 'put',
    data: data
  })
}

// 删除公摊报表
export function delPublicShareReport(id) {
  return request({
    url: '/datastatistics/publicShareReport/' + id,
    method: 'delete'
  })
}

// 查询公摊报表-汇总
export function selectTotalReportList(query) {
  return request({
    url: '/datastatistics/publicShareReport/selectTotalReportList',
    method: 'get',
    params: query
  })
}

// 查询公摊报表-公摊明细
export function selectProductReportList(query) {
  return request({
    url: '/datastatistics/publicShareReport/selectProductReportList',
    method: 'get',
    params: query
  })
}